
	<div class="contorl-group row">
			<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
			  <ul class="breadcrumb">
				<li><a href="#">分类管理</a> <span class="divider">></span></li>
				<li class="active">编辑分类</li>
			  </ul>
			</div>
<?php
	if(!empty($result)){
		echo "<p>".$result."</p>";
	}


	if(!empty($cate)){
		$attrbutes = array(
			'class' => 'form-horizontal',
			'id' => 'form_edit'
		);
		echo form_open("category/edit",$attrbutes);
		echo form_hidden('action','update');
		echo form_hidden('category_id',$cate['category_id']);
?>
			<div class="control-group">
				<label for='category_name' class="control-label"><s>*</s>分类名</label>
				<div class="controls">
					<input type="text" value="<?php echo $cate['category_name'];?>" name="category_name" data-rules="{required:true}"/>
				</div>
			</div>
			
			<div class="control-group">
				<label for='parent_id' class="control-label"><s>*</s>父级分类</label>
				<div class="controls">
					<?php
							$cates = $this->category->getAllCategory2();
							echo "<select name='parent_id' data-rules='{required:true}'>";
							echo "<option value='0'>作为顶级分类</option>";
							$this->category->getTree2($cates,$cate['category_id'],$cate['parent_id']);
							echo "</select>";
					?>
				</div>
			</div>

			<div class="control-group">
				<label for='ordernum' class="control-label"><s>*</s>排序</label>
				<div class="controls">
					<input type="text" value="<?php echo $cate['ordernum'];?>" name="ordernum" data-rules="{required:true}"/>
				</div>
			</div>
			
		<div class="actions-bar  centered">
			<input type="submit" class='button button-primary' checked="checked" value="提交更改"/>
		</div>
<?php
		echo form_close();
	}

?>
	</div>

<script type='text/javascript'>

var Form = BUI.Form;
new Form.Form({
	srcNode:'#form_edit'
}).render();

</script>
